// 封装所有请求
import request from "./request";

// home (首页)模块
    // /house/list 房源列表 测试接口
export const $houseList = (params = {}) => {
    return request.get("house/list", { params });
  };
    // /house/city 城市列表 测试接口
export const $housecity = (data = {}) => {
  return request.post("/house/city", data);
};
    // /house/scene 景点列表 测试接口
export const $houseScene = (params = {}) => {
  return request.get("house/scene", { params });
};

// /house/introduction 介绍 测试接口
// /house/comment 评论列表 测试接口
// /house/introduction 介绍 测试接口
// /house/around 周边环境 测试接口
// /house/recommend 推荐列表 测试接口
// /house/detail 详情 测试接口

// love(收藏)模块
export const $loveChange = (data = {}) => {
  return request.post("/love/change", data);
};
export const $loveList = (params = {}) => {
  return request.get("love/list", { params });
};
export const $loveDetail = (params = {}) => {
  return request.get("love/detail", { params });
};

// browse(我的足迹)模块
export const $browseList = (params = {}) => {
  return request.get("browse/list", { params });
};
export const $browseDetail = (params = {}) => {
  return request.get("browse/detail", { params });
};
export const $browseAdd = (data = {}) => {
  return request.post("/browse/add", data);
};
export const $browseDel = (data = {}) => {
  return request.post("/browse/del", data);
};

// find (发现)模块
export const $discoverList = (params = {}) => {
  return request.get("discover/list", { params });
};
export const $discoverDetail = (params = {}) => {
  return request.get("discover/detail", { params });
};

// user(用户)模块
  // 获取验证码
export const $userGetSmsCode = (data = {}) => {
  return request.post("/user/getSmsCode", data);
};
  // 登录
export const $userLoginBySmsCode  = (data = {}) => {
  return request.post("/user/loginBySmsCode", data);
};
